This repository was archived by the owner on Sep 5, 2025. It is now read-only.
feat: add support for both local instances and remote clusters#87
Merged
matthewmcneely merged 16 commits intomainfrom Apr 29, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for both local in-process database instances and remote Dgraph clusters by renaming and refactoring the package from modusdb to modusgraph while also introducing additional logging, GRPC server setup, and accompanying tests. Key changes include:
- Renaming and reorganization of package and API functions to support dual deployment modes.
- Introduction of new test files for insert, delete, and admin operations.
- Enhancements in engine initialization and schema mutation functions with improved structured logging.
Reviewed Changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| insert_test.go | Added tests for insertion (single/multiple) with unique constraint checks |
| engine.go | Updated engine initialization with logger, new listener & GRPC server set up |
| delete_test.go | Added tests to validate delete operations |
| config.go | Updated configuration to support logger injection & package renaming |
| buf_server.go | Introduced bufconn-based GRPC server implementation |
| All API files | Renamed package from modusdb to modusgraph and updated references |
| README.md & CHANGELOG.md | Updated branding and repository URLs accordingly |
| CONTRIBUTING.md | Updated links to reflect new repository naming |
| admin_test.go | Added tests for admin functions (DropData/DropAll, schema updates, etc.) |
Files not reviewed (1)
- go.mod: Language not supported
Comments suppressed due to low confidence (2)
README.md:25
- There appears to be a typo in 'runnning'; it should be 'running'.
When runnning in-process, modusGraph internalizes Dgraph's server components, and data is written to a local
api_types.go:77
- [nitpick] The change from 'WithNamespace' to 'WithNamespaceOLD' could be confusing; consider clarifying the intent or renaming for consistency.
func WithNamespaceOLD(ns uint64) ModusDbOption {
Also update some packages from known vulnerabilities
807e879 to
1072a7d
Compare
Contributor
Author
|
@ryanfoxtyler All conflicts sorted and tests passing.... |
ryanfoxtyler
approved these changes
Apr 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR reworks modusgraph to allow the creation of applications to use both the internal "engine"-based system as well as traditional Dgraph clusters.
I have kept the old API in place for backwards compatibility.
There are still a number of TODOs including an update of the CHANGELOG, but wanted to get this up for review ASAP. St
Checklist
CHANGELOG.mdfile describing and linking tothis PR